/**
 * @description 判断当前路由是否包含权限
 * @param permissions
 * @param route
 * @returns {boolean|*}
 */
function hasPermission(permissions: any[], route: any) {
  if (route.meta && route.meta.permissions) {
    return permissions.some((role: string) => route.meta.permissions.includes(role));
  } else {
    return true;
  }
}

export {
  hasPermission
}
